package com.yun.datastructure.tree.heap.leetcode;

import java.util.PriorityQueue;

public class Leetcode295B {
    private PriorityQueue<Integer> left = new PriorityQueue<>((a, b) -> Integer.compare(b, a));

    private PriorityQueue<Integer> right = new PriorityQueue<>();

    public void addNum(int num) {
        if (left.size() == right.size()) {
            right.offer(num);
            left.offer(right.poll());
        } else {
            left.offer(num);
            right.offer(left.poll());
        }
    }

    public double findMedian() {
        return 0;
    }
}
